using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._LocationReferencingTools
{
    /// <summary>
    /// <para>Translate Event Measures</para>
    /// <para>Translates the measures (m-values) of a point or line event layer from one linear referencing method (LRM) to another.</para>
    /// <para>将点或线事件图层的测量值（m 值）从一种线性参考方法 （LRM） 转换为另一种线性参考方法 （LRM）。</para>
    /// </summary>    
    [DisplayName("Translate Event Measures")]
    public class TranslateEventMeasures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TranslateEventMeasures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_source_event">
        /// <para>Source Event Layer</para>
        /// <para>The input event layer to be translated.</para>
        /// <para>要转换的输入事件图层。</para>
        /// </param>
        /// <param name="_in_target_route_features">
        /// <para>Input Target Route Features</para>
        /// <para>The target LRS Network against which the input events will be translated.</para>
        /// <para>将转换输入事件的目标 LRS 网络。</para>
        /// </param>
        /// <param name="_out_target_event">
        /// <para>Output Event Layer</para>
        /// <para>The output feature class that will contain the translated event features.</para>
        /// <para>将包含已翻译事件要素的输出要素类。</para>
        /// </param>
        public TranslateEventMeasures(object _in_source_event, object _in_target_route_features, object _out_target_event)
        {
            this._in_source_event = _in_source_event;
            this._in_target_route_features = _in_target_route_features;
            this._out_target_event = _out_target_event;
        }
        public override string ToolboxName => "Location Referencing Tools";

        public override string ToolName => "Translate Event Measures";

        public override string CallName => "locref.TranslateEventMeasures";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_source_event, _in_target_route_features, _out_target_event, _in_concurrent_route_matching.GetGPValue()];

        /// <summary>
        /// <para>Source Event Layer</para>
        /// <para>The input event layer to be translated.</para>
        /// <para>要转换的输入事件图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Event Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_source_event { get; set; }


        /// <summary>
        /// <para>Input Target Route Features</para>
        /// <para>The target LRS Network against which the input events will be translated.</para>
        /// <para>将转换输入事件的目标 LRS 网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Target Route Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_target_route_features { get; set; }


        /// <summary>
        /// <para>Output Event Layer</para>
        /// <para>The output feature class that will contain the translated event features.</para>
        /// <para>将包含已翻译事件要素的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Event Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_target_event { get; set; }


        /// <summary>
        /// <para>Concurrent Route Matching</para>
        /// <para><xdoc>
        ///   <para>Specifies the method used to determine which route to translate the event against when concurrent routes exist in the target LRS Network. This parameter is only applied when the location of the event translation on the target LRS Network has concurrent routes (routes that share a location).</para>
        ///   <bulletList>
        ///     <bullet_item>Any concurrent route—The input event layer is translated against the first of two or more concurrent routes found in the target LRS Network.</bullet_item><para/>
        ///     <bullet_item>Route with matching RouteID—The Route ID of the source event is compared to the Route IDs of concurrent routes in the target LRS Network. The source event will translate based on Route ID matches in the source event and target network. The Route IDs of the input event and target LRS Network must be an exact match for this method to correctly translate the event. The input event layer must also be a registered LRS event to use this method.</bullet_item><para/>
        ///     <bullet_item>All concurrent routes—The input event is translated against all the concurrent routes at that location in the target LRS Network.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定用于确定当目标 LRS 网络中存在并发路由时要针对哪个路由转换事件的方法。仅当目标 LRS 网络上的事件转换位置具有并发路由（共享位置的路由）时，才应用此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>任何并发路由 - 输入事件图层将针对目标 LRS 网络中找到的两个或多个并发路由中的第一个进行转换。</bullet_item><para/>
        ///     <bullet_item>具有匹配 RouteID 的路由 - 将源事件的路由 ID 与目标 LRS 网络中并发路由的路由 ID 进行比较。源事件将根据源事件和目标网络中的路由 ID 匹配进行转换。输入事件和目标 LRS 网络的路由 ID 必须完全匹配，才能正确转换事件。输入事件图层还必须是已注册的 LRS 事件才能使用此方法。</bullet_item><para/>
        ///     <bullet_item>所有并发路由 - 输入事件将针对目标 LRS 网络中该位置的所有并发路由进行转换。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Concurrent Route Matching")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _in_concurrent_route_matching_value _in_concurrent_route_matching { get; set; } = _in_concurrent_route_matching_value._ANY;

        public enum _in_concurrent_route_matching_value
        {
            /// <summary>
            /// <para>Any concurrent route</para>
            /// <para>Any concurrent route—The input event layer is translated against the first of two or more concurrent routes found in the target LRS Network.</para>
            /// <para>任何并发路由 - 输入事件图层将针对目标 LRS 网络中找到的两个或多个并发路由中的第一个进行转换。</para>
            /// </summary>
            [Description("Any concurrent route")]
            [GPEnumValue("ANY")]
            _ANY,

            /// <summary>
            /// <para>Route with matching RouteID</para>
            /// <para>Route with matching RouteID—The Route ID of the source event is compared to the Route IDs of concurrent routes in the target LRS Network. The source event will translate based on Route ID matches in the source event and target network. The Route IDs of the input event and target LRS Network must be an exact match for this method to correctly translate the event. The input event layer must also be a registered LRS event to use this method.</para>
            /// <para>具有匹配 RouteID 的路由 - 将源事件的路由 ID 与目标 LRS 网络中并发路由的路由 ID 进行比较。源事件将根据源事件和目标网络中的路由 ID 匹配进行转换。输入事件和目标 LRS 网络的路由 ID 必须完全匹配，才能正确转换事件。输入事件图层还必须是已注册的 LRS 事件才能使用此方法。</para>
            /// </summary>
            [Description("Route with matching RouteID")]
            [GPEnumValue("ROUTE_ID")]
            _ROUTE_ID,

            /// <summary>
            /// <para>All concurrent routes</para>
            /// <para>All concurrent routes—The input event is translated against all the concurrent routes at that location in the target LRS Network.</para>
            /// <para>所有并发路由 - 输入事件将针对目标 LRS 网络中该位置的所有并发路由进行转换。</para>
            /// </summary>
            [Description("All concurrent routes")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        public TranslateEventMeasures SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}